﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NHibernate;
using BobDotNet.Forms.Configuration;

namespace BobDotNet.Forms
{
    public partial class AccesRapide : Form
    {
        public AccesRapide()
        {
            InitializeComponent();
        }

        private void tvMenu_DoubleClick(object sender, EventArgs e)
        {
            if (!tvMenu.SelectedNode.Name.StartsWith("Noeud"))
            {
                switch (tvMenu.SelectedNode.Name)
                {
                    case "societes" :
                        SocieteForm sf = new SocieteForm();
                        sf.MdiParent = this.MdiParent;
                        sf.Show();
                        sf.Location = new Point(this.Width, 0);
                        break;

                    /*case "ActiviteSite" :
                        SiteActiviteForm saf = new SiteActiviteForm(_sessionFactory);
                        saf.MdiParent = this.MdiParent;
                        saf.Show();
                        saf.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "regions":
                        RegionsForm rf = new RegionsForm(_sessionFactory);
                        rf.MdiParent = this.MdiParent;
                        rf.Show();
                        rf.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Services":
                        ServicesForm servicef = new ServicesForm(_sessionFactory);
                        servicef.MdiParent = this.MdiParent;
                        servicef.Show();
                        servicef.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "TypeContrat":
                        TypeContratForm tcf = new TypeContratForm(_sessionFactory);
                        tcf.MdiParent = this.MdiParent;
                        tcf.Show();
                        tcf.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "TypeLigne":
                        TypeLigneForm tlf = new TypeLigneForm(_sessionFactory);
                        tlf.MdiParent = this.MdiParent;
                        tlf.Show();
                        tlf.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "TypeLogiciel":
                        TypeLogicielForm tlof = new TypeLogicielForm(_sessionFactory);
                        tlof.MdiParent = this.MdiParent;
                        tlof.Show();
                        tlof.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "logiciels":
                        LogicielForm lf = new LogicielForm(_sessionFactory, IdUser);
                        lf.MdiParent = this.MdiParent;
                        lf.Show();
                        lf.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "fournisseurs":
                        EditeurForm ef = new EditeurForm(_sessionFactory, IdUser);
                        ef.MdiParent = this.MdiParent;
                        ef.Show();
                        ef.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "utilisateurs":
                        UtilisateursForm uf = new UtilisateursForm(_sessionFactory, IdUser);
                        uf.MdiParent = this.MdiParent;
                        uf.Show();
                        uf.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "sites":
                        SiteForm sitF = new SiteForm(_sessionFactory, IdUser);
                        sitF.MdiParent = this.MdiParent;
                        sitF.Show();
                        sitF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "contrats":
                        ContratsForm ctF = new ContratsForm(_sessionFactory, IdUser);
                        ctF.MdiParent = this.MdiParent;
                        ctF.Show();
                        ctF.Location = new Point(this.Width, 0);
                        break;*/

                    case "priorite_di":
                        PrioriteDiForm pDI = new PrioriteDiForm();
                        pDI.MdiParent = this.MdiParent;
                        pDI.Show();
                        pDI.Location = new Point(this.Width, 0);
                        break;

                    /*case "type_di":
                        TypesDiForm tDI = new TypesDiForm(_sessionFactory);
                        tDI.MdiParent = this.MdiParent;
                        tDI.Show();
                        tDI.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "creation_di":
                        DiForm cDI = new DiForm(_sessionFactory, IdUser);
                        cDI.MdiParent = this.MdiParent;
                        cDI.Show();
                        cDI.Location = new Point(this.Width, 0);
                        break;*/

                    case "EtatDi":
                        EtatDiForm etDI = new EtatDiForm();
                        etDI.MdiParent = this.MdiParent;
                        etDI.Show();
                        etDI.Location = new Point(this.Width, 0);
                        break;

                    case "EtatDevis":
                        EtatDevisForm etDev = new EtatDevisForm();
                        etDev.MdiParent = this.MdiParent;
                        etDev.Show();
                        etDev.Location = new Point(this.Width, 0);
                        break;

                    /*case "recherche_di":
                        DiRechercheForm diR = new DiRechercheForm(_sessionFactory, IdUser);
                        diR.MdiParent = this.MdiParent;
                        diR.Show();
                        diR.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "etat_di":
                        StatDiForm diS = new StatDiForm(_sessionFactory);
                        diS.MdiParent = this.MdiParent;
                        diS.Show();
                        diS.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "TypeMateriel":
                        TypeMaterielForm tmS = new TypeMaterielForm(_sessionFactory);
                        tmS.MdiParent = this.MdiParent;
                        tmS.Show();
                        tmS.Location = new Point(this.Width, 0);
                        break;*/

                    case "MarqueMateriel":
                        MarqueMaterielForm mmS = new MarqueMaterielForm();
                        mmS.MdiParent = this.MdiParent;
                        mmS.Show();
                        mmS.Location = new Point(this.Width, 0);
                        break;

                    /*case "ModeleMateriel":
                        ModeleMaterielForm momS = new ModeleMaterielForm(_sessionFactory);
                        momS.MdiParent = this.MdiParent;
                        momS.Show();
                        momS.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "TailleMateriel":
                        TailleMaterielForm tomS = new TailleMaterielForm(_sessionFactory);
                        tomS.MdiParent = this.MdiParent;
                        tomS.Show();
                        tomS.Location = new Point(this.Width, 0);
                        break;*/
                    
                    case "ProcesseurMateriel":
                        ProcesseurForm pmF = new ProcesseurForm();
                        pmF.MdiParent = this.MdiParent;
                        pmF.Show();
                        pmF.Location = new Point(this.Width, 0);
                        break;

                    case "LecteurOptique":
                        LecteurOptiqueForm loF = new LecteurOptiqueForm();
                        loF.MdiParent = this.MdiParent;
                        loF.Show();
                        loF.Location = new Point(this.Width, 0);
                        break;

                    /*case "TypeMemoire":
                        TypeMemoireForm tmF = new TypeMemoireForm(_sessionFactory);
                        tmF.MdiParent = this.MdiParent;
                        tmF.Show();
                        tmF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "FormatMateriel":
                        FormatMaterielForm fmF = new FormatMaterielForm(_sessionFactory);
                        fmF.MdiParent = this.MdiParent;
                        fmF.Show();
                        fmF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Station":
                        StationsForm sF = new StationsForm(_sessionFactory, IdUser);
                        sF.MdiParent = this.MdiParent;
                        sF.Show();
                        sF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Ecrans":
                        EcransForm eF = new EcransForm(_sessionFactory, IdUser);
                        eF.MdiParent = this.MdiParent;
                        eF.Show();
                        eF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "ProprieteAchat":
                        ProprieteAchatForm paF = new ProprieteAchatForm();
                        paF.MdiParent = this.MdiParent;
                        paF.Show();
                        paF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Routeurs":
                        RouteursForm rsF = new RouteursForm(_sessionFactory, IdUser);
                        rsF.MdiParent = this.MdiParent;
                        rsF.Show();
                        rsF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "BoitierDImpression":
                        BoitierDImpressionForm diF = new BoitierDImpressionForm(_sessionFactory, IdUser);
                        diF.MdiParent = this.MdiParent;
                        diF.Show();
                        diF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Imprimante":
                        ImprimanteForm iF = new ImprimanteForm(_sessionFactory, IdUser);
                        iF.MdiParent = this.MdiParent;
                        iF.Show();
                        iF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "CAB":
                        CabForm cabF = new CabForm(_sessionFactory, IdUser);
                        cabF.MdiParent = this.MdiParent;
                        cabF.Show();
                        cabF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "UC":
                        UcForm ucF = new UcForm(_sessionFactory, IdUser);
                        ucF.MdiParent = this.MdiParent;
                        ucF.Show();
                        ucF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Divers":
                        DiversForm divF = new DiversForm(_sessionFactory, IdUser);
                        divF.MdiParent = this.MdiParent;
                        divF.Show();
                        divF.Location = new Point(this.Width, 0);
                        break;*/

                    /*case "Mobile":
                        MobForm mobF = new MobForm(_sessionFactory, IdUser);
                        mobF.MdiParent = this.MdiParent;
                        mobF.Show();
                        mobF.Location = new Point(this.Width, 0);
                        break;*/

                    default: MessageBox.Show("Désolé, ce menu n'est pas paramétré.");
                        break;
                }
            }
        }
    }
}
